function save_options() {
	var status = document.getElementById("status");
	var username = document.getElementById("username");
	var password = document.getElementById("password");
	
	if (!username.value) {
		status.innerHTML = "<strong>Vous devez sp&eacute;cifier un nom d'utilisateur.</strong>";
		return;
	}
	
	if (!password.value) {
		status.innerHTML = "<strong>Vous devez entrer un mot de passe.</strong>";
		return;
	}
	
	localStorage["username"] = username.value;
	localStorage["password"] = password.value;
	
	status.innerHTML = "Configuration enregistr&eacute;e.";
}

function restore_options() {
	var username = localStorage["username"];
	if (!username)
		return;
	
	var password = localStorage["password"];
	if (!password)
		return;
	
	document.getElementById("username").value = username;
	document.getElementById("password").value = password;
}